package cloud.seri.iot.manager.service.dto

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.time.Instant
import javax.validation.constraints.DecimalMax
import javax.validation.constraints.DecimalMin
import javax.validation.constraints.Max
import javax.validation.constraints.Min
import javax.validation.constraints.NotNull
import javax.validation.constraints.Pattern
import javax.validation.constraints.Size
import java.io.Serializable
import java.util.Objects

/**
 * A DTO for the [cloud.seri.iot.manager.domain.Device] entity.
 */
@ApiModel(description = "The Device entity. @author A true hipster", value = "Device")
data class DeviceDTO(

    @ApiModelProperty(value = "IotId", required = true)
    var iotId: String? = null,
    /**
     * 设备名称
     */

    @get: NotNull
    @get: Size(min = 4, max = 32)
    @ApiModelProperty(value = "设备名称", required = true)
    var deviceName: String? = null,
    /**
     * 设备秘钥
     */

    var nickname: String? = null,

    @ApiModelProperty(value = "设备秘钥")
    var deviceSecret: String? = null,
    /**
     * 激活时间
     */

    @ApiModelProperty(value = "激活时间")
    var activeDate: Instant? = null,
    /**
     * 最后在线时间
     */

    @ApiModelProperty(value = "最后在线时间")
    var onlineDate: Instant? = null,
    /**
     * 设备状态。取值：
     * ONLINE：设备在线。
     * OFFLINE：设备离线。
     * UNACTIVE：设备未激活。
     * DISABLE：设备已禁用。
     */

    @ApiModelProperty(value = "设备状态。取值： ONLINE：设备在线。 OFFLINE：设备离线。 UNACTIVE：设备未激活。 DISABLE：设备已禁用。")
    var status: Int = 0,
    /**
     * 最后IP地址
     */

    @ApiModelProperty(value = "最后IP地址")
    var ipAddress: String? = null,


    @ApiModelProperty(value = "地图坐标")
    var coordinate: DoubleArray? = null,
    /**
     * 详细地址
     */

    @ApiModelProperty(value = "详细地址")
    var address: String? = null,
    /**
     * 货道数量
     */

    @ApiModelProperty(value = "货道数量")
    var aisleCount: Int = 1,

    /**
     * 设备的固件版本号。
     */

    @ApiModelProperty(value = "设备的固件版本号。")
    var firmwareVersion: String? = null,

    var productKey: String? = null,

    var productName: String? = null,

    var createdDate: Instant? = null

) : Serializable
